www.gusucode.com > 基于VBLAST-OFDM的MATLAB SIMULATION,图形化界面,并且给出了各仿真图 > 基于VBLAST-OFDM的MATLAB SIMULATION,图形化界面,并且给出了各仿真图/vblast-ofdm simulation/launch.m

    function fig = launch()
% This is the machine-generated representation of a Handle Graphics object
% and its children.  Note that handle values may change when these objects
% are re-created. This may cause problems with any callbacks written to
% depend on the value of the handle at the time the object was saved.
% This problem is solved by saving the output as a FIG-file.
%
% To reopen this object, just type the name of the M-file at the MATLAB
% prompt. The M-file and its associated MAT-file must be on your path.
% 
% NOTE: certain newer features in MATLAB may not have been saved in this
% M-file due to limitations of this format, which has been superseded by
% FIG-files.  Figures which have been annotated using the plot editor tools
% are incompatible with the M-file/MAT-file format, and should be saved as
% FIG-files.



h0 = figure('Units','points', ...
	'Color',[0.8 0.8 0.8], ...
	'Colormap','default', ...
	'FileName','launch.m', ...
	'MenuBar','none', ...
	'Name','OFDM Based Packet Simulator : Developed by M. Jankiraman', ...
	'NumberTitle','off', ...
	'PaperPosition',[18 180 576 432], ...
	'PaperUnits','points', ...
	'Position',[200 167.5 420.25 250.5], ...
	'Resize','off', ...
	'Tag','UIFigure', ...
	'ToolBar','none');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[18.75 217.5 93.75 18.75], ...
	'String','Number of FFT Points', ...
	'Style','text', ...
    'ToolTipString','Choose the size of the OFDM system', ...
    'ForegroundColor','b', ...
	'Tag','StaticText1');
h2 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','verify_params', ...
	'ListboxTop',0, ...
	'Position',[18.75 207.75 93.75 18.75], ...
	'String','64', ...
	'Style','checkbox', ...
    'ToolTipString','', ...
	'Tag','FFTsixtyfour', ...
	'Value',1);
h3 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','verify_params', ...
	'ListboxTop',0, ...
	'Position',[58.75 207.75 93.75 18.75], ...
	'String','128', ...
	'Style','checkbox', ...
    'ToolTipString','', ...
	'Tag','FFTonetwoeight');
h4 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','verify_params', ...
	'ListboxTop',0, ...
	'Position',[98.75 207.75 93.75 18.75], ...
	'String','256', ...
	'Style','checkbox', ...
    'ToolTipString','', ...
	'Tag','FFTtwofivesix');
h5 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','verify_params', ...
	'ListboxTop',0, ...
	'Position',[138.75 207.75 93.75 18.75], ...
	'String','512', ...
	'Style','checkbox', ...
    'ToolTipString','', ...
	'Tag','FFTfiveonetwo');
h6 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','verify_params', ...
	'ListboxTop',0, ...
	'Position',[18.75 167.25 168.75 18.75], ...
	'String','Interleave Bits', ...
	'Style','checkbox', ...
    'ToolTipString','Interleaving depth up-to one symbol.', ...
    'ForegroundColor','b', ...
    'FontWeight','bold', ...
	'Tag','InterleavingBits', ...
	'Value',1);
h7 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','verify_params', ...
	'ListboxTop',0, ...
	'Position',[18.75 187.75 93.75 18.75], ...
	'String','Zero Padding', ...
	'Style','checkbox', ...
    'ToolTipString','Select amount of zero padding in chosen FFT.', ...
    'ForegroundColor','b', ...
    'FontWeight','bold', ...
	'Tag','ZeroPad', ...
	'Value',0);
h8 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'FontSize',9, ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[18.75 167.25 168.75 18.75], ...
	'String','Number of Data Carriers', ...
	'Style','text', ...
    'ForegroundColor','b', ...
    'ToolTipString','Input the number of data carriers (10 < # of data carriers < FFT size).The remaining carriers on the edges in the OFDM system will be put to zero.', ...
    'Visible','Off', ...
	'Tag','StaticText');
h9 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','verify_params', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[112.5 167.25 75 18.75], ...
	'String','16', ...
	'Style','edit', ...
    'Visible','Off', ...
	'Tag','DataCarriers');
h10 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'FontSize',9, ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[18.75 137.75 168.75 18.75], ...
	'String','Modulation', ...
	'Style','text', ...
    'ForegroundColor','b', ...
    'ToolTipString','Type of modulation is selectable.', ...
	'Tag','StaticText1');
h11 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'ListboxTop',0, ...
	'Position',[112.5 137.75 75 18.75], ...
	'String',['BPSK ';'QPSK '], ...
	'Style','popupmenu', ...
	'Tag','ModulationType', ...
    'Value',1);
h12 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'FontSize',9, ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[18.75 107.75 168.75 18.75], ...
	'String','Convolutional code rate', ...
	'Style','text', ...
    'ForegroundColor','b', ...
    'ToolTipString','Convolution codes are mandatory. 1/2 rate code is the minimum.', ...
	'Tag','StaticText1');
h13 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'ListboxTop',0, ...
	'Position',[112.5 107.75 75 18.75], ...
	'String',['R1/2';'R2/3';'R3/4'], ...
	'Style','popupmenu', ...
	'Tag','ConvCodeRate', ...
	'Value',1);
h14 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[18.75 87.75 93.75 13.5], ...
	'String','Channel Model', ...
	'Style','text', ...
    'ForegroundColor','b', ...
    'ToolTipString','Choose from:AWGN / Rician(you must specify the "K Factor" as a number and NOT in dBs) / Rayleigh (choose the maximum delay spread in the channel in nanosecs).', ..., ...
    'Tag','StaticText1');
h15 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','verify_params', ...
	'ListboxTop',0, ...
	'Position',[18.75 67.75 93.75 18.75], ...
	'String','AWGN', ...
	'Style','radiobutton', ...
	'Tag','AWGN', ...
	'Enable','inactive', ...
	'Value',1);
h16 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','verify_params', ...
	'Enable','on', ...
	'ListboxTop',0, ...
	'Position',[60.75 67.75 93.75 18.75], ...
	'String','Rician', ...
	'Style','radiobutton', ...
	'Tag','Rician');
h17 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','verify_params', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[100.75 67.75 19.5 13.75], ...
	'String','0', ...
	'Style','edit', ...
	'Tag','kfactor');
h18 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'FontSize',9, ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[130.75 67.75 32.25 12.75], ...
	'String','K Factor', ...
	'Style','text', ...
	'Tag','StaticText1');
h19 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','verify_params', ...
	'Enable','on', ...
	'ListboxTop',0, ...
	'Position',[18.75 47.75 93.75 15.75], ...
	'String','Rayleigh', ...
	'Style','radiobutton', ...
	'Tag','MaxDelaySpread');
h20 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','verify_params', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[80.75 47.75 40.75 15.75], ...
	'String','50', ...
	'Style','edit', ...
	'Tag','TimeMaxDelay');
h21 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'FontSize',9, ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[130.75 47.75 40.75 15.75], ...
	'String','T rms (ns)', ...
	'Style','text', ...
	'Tag','StaticText1');
h22 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','verify_params', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[108.75 17.75 40.75 15.75], ...
	'String','100', ...
	'Style','edit', ...
	'Tag','SimulationPackets');
h23 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[18.75 10.75 90.75 20.75], ...
	'String','Packets to simulate', ...
	'Style','text', ...
    'ForegroundColor','b', ...
    'ToolTipString','Number of packets to be transmitted. This defines the number of Monte Carlo runs.', ...
	'Tag','StaticText1');
h24 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','verify_params', ...
	'ListboxTop',0, ...
	'Position',[208.75 207.5 93.75 18.75], ...
	'String','Channel Estimation', ...
	'Style','checkbox', ...
	'Tag','ChannelEstimation_LSE');
h25 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','verify_params', ...
	'ListboxTop',0, ...
	'Position',[308.75 207.5 103.75 18.75], ...
	'String','Channel Estimation (FFT)', ...
	'Style','checkbox', ...
    'ForegroundColor','b', ...
    'ToolTipString','Additional recommended option while using STBC.', ...
	'Tag','ChannelEstimation_FFT');
h26 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'BusyAction','cancel', ...
	'Callback','start_simulation', ...
	'Interruptible','off', ...
	'ListboxTop',0, ...
	'Position',[318.75 10.75 90.75 20.75], ...
	'String','Start Simulation', ...
    'ForegroundColor',[0 0.4 0], ...
    'FontWeight','bold', ...
 	'Tag','Pushbutton1');



h27 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[208.75 177.5 93.75 18.75], ...
	'String','OFDM-MIMO (MRC/STC)', ...
	'Style','text', ...
    'ToolTipString','Uses MRC(for one antenna at the transmitter) and block STC for multiple antennas in all other cases.', ...
    'ForegroundColor','b', ...
    'Tag','StaticText1');
h28 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','verify_params', ...
	'ListboxTop',0, ...
	'Position',[208.75 157.5 93.75 18.75], ...
	'String','x2', ...
	'Style','checkbox', ...
    'ToolTipString','Check this box for increasing the tx. diversity to x2.', ...
    'ForegroundColor','b', ...
	'Tag','MIMO_TwoTxAntennas');
h29 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','verify_params', ...
	'ListboxTop',0, ...
	'Position',[308.75 157.5 93.75 18.75], ...
	'String','x4', ...
	'Style','checkbox', ...
    'ToolTipString','Check this box for increasing the tx. diversity to x4.', ...
    'ForegroundColor','b', ...
	'Tag','MIMO_FourTxAntennas');
h30 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','verify_params', ...
	'ListboxTop',0, ...
	'Position',[208.75 137.5 93.75 18.75], ...
	'String','x2', ...
	'Style','checkbox', ...
    'ToolTipString','Check this box for increasing the rx. diversity to x2.', ...
    'ForegroundColor','b', ...
	'Tag','MIMO_TwoRxAntennas');
h31 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','verify_params', ...
	'ListboxTop',0, ...
	'Position',[308.75 137.5 93.75 18.75], ...
	'String','x4', ...
	'Style','checkbox', ...
    'ToolTipString','Check this box for increasing the rx. diversity to x4.', ...
    'ForegroundColor','b', ...
	'Tag','MIMO_FourRxAntennas');
h32 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','verify_params', ...
	'ListboxTop',0, ...
	'Position',[208.75 107.5 93.75 18.75], ...
	'String','OFDM-MIMO(VBlast)', ...
	'Style','checkbox', ...
    'ToolTipString','This program only deals with 1 x 2, 2 x 2, 2 x 3 and 2 x 4 systems. There is no interleaving and no channel estimation.', ...
    'ForegroundColor','b', ...
	'Tag','VBLAST');
h33 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','verify_params', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[300.75 87.5 93.75 18.75], ...
	'String','1', ...
	'Style','edit', ...
   'Tag','MIMO_Tx. Antennas');
h34 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[208.75 87.5 83.75 18.75], ...
	'String','No. of Tx. Antennas', ...
	'Style','text', ...
	'Tag','StaticText1');
h35 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','verify_params', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[300.75 57.5 93.75 18.75], ...
	'String','2', ...
	'Style','edit', ...
   'Tag','MIMO_Rx. Antennas');
h36 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[208.75 57.5 83.75 18.75], ...
	'String','No. of Rx. Antennas', ...
	'Style','text', ...
   'Tag','StaticText1');
h37 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','verify_params', ...
	'ListboxTop',0, ...
	'Position',[208.75 35.75 90.75 20.75], ...
	'String','Save Run ?', ...
	'Style','checkbox', ...
    'ToolTipString','Check this box for saving the results of this run. The file will be saved in the current directory.', ...
    'ForegroundColor','b', ...
	'Tag','Savefile');
h38 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','verify_params', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[208.75 10.75 90.75 20.75], ...
	'String','', ...
	'Style','edit', ...
    'Tag','FileName');
h39 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[160.75 5.75 45.75 20.75], ...
	'String','File Name', ...
	'Style','text', ...
    'ForegroundColor','r', ...
    'FontWeight','bold', ...
   'Tag','StaticText1');



if nargout > 0, fig = h0; end